import React, { Component } from 'react'

function imoocFrom(Comp){
  return class wrapperComp extends Component{
    constructor(props){
      super(props)
      this.handleChage=this.handleChage.bind(this)
      this.state={}
    }
    handleChage(k,v){
      this.setState({
        [k]:v
      })
    }
    render(){
      return  (
        <div>
          <Comp state={this.state} handleChage={this.handleChage} {...this.props}/>
        </div>
      )
    }
  }
}

export default imoocFrom